# 1 字符串操作
message_1 = " you are John? "
message_2 = "yes, of course"
message_3 = 666
message_4 = "abc_"

## 1.1 字符串首字母变大写，所有字符变大写/小写

## 1.2 组合字符串，及换行符\n、制表符\t、换行符\r
message = f"{message_1}\n{message_2}\n\t\t{message_3}"
print(message)
print(f"{message} and {message_1} oh, {message_2}")

print("Hello\rWorld")
print("Hello\r\nWorld")
print("Hello\n\rWorld")

## 1.3 删除字符串左边/右边的空白
message_1 = message_1.rstrip()
message_1 = message_1.lstrip()
print(message_1)

## 1.4 删除前\后缀
message = f"{message_4}{message_1}"
message = message.removeprefix(message_4)
# message = f"{message_1}{message_4}"
message = message.removesuffix(message_4)
print(message)
